package com.lanou.utp.service.impl;

import com.lanou.utp.entity.Base;
import com.lanou.utp.entity.Student;
import com.lanou.utp.entity.Teacher;
import com.lanou.utp.entity.Teachlink;
import com.lanou.utp.mapper.OptionMapper;
import com.lanou.utp.service.OptionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author MaQingYun
 */
@Service
public class OptionServiceImpl implements OptionService {

    @Resource
    private OptionMapper optionMapper;

    @Override
    public List<Teachlink> getSemester() {
        return this.optionMapper.getSemester();
    }

    @Override
    public List<Base> getBase() {
        return this.optionMapper.getBase();
    }

    @Override
    public List<Teacher> getTeachers(Long id) {
        return this.optionMapper.getTeachers(id);
    }

    @Override
    public List<Teacher> adviserTeahcers(Long id) {
        return this.optionMapper.getTeachersByBaseId(id);
    }

    @Override
    public List<Student> getAllStudentsByMajorId(long majorId) {
        return this.optionMapper.getAllStudentsByMajorId(majorId);
    }

}
